function encode(data_str, account, password) {
  var scode = data_str.split('#')[0]
  var sxh = data_str.split('#')[1]
  var code = account + '%%%' + password
  var encoded = ''
  for (var i = 0; i < code.length; i++) {
    if (i < 20) {
      encoded =
        encoded + code.substring(i, i + 1) + scode.substring(0, parseInt(sxh.substring(i, i + 1)))
      scode = scode.substring(parseInt(sxh.substring(i, i + 1)), scode.length)
    } else {
      encoded = encoded + code.substring(i, code.length)
      i = code.length
    }
  }
  return encoded
}
